Encoding and writing of data on multitrack tape

ABSTRACT

A block of data is partitioned into a plurality of sub-blocks each including a logical array having rows and columns of data symbols, encoded using a row linear block code and a column linear block code. Each product codeword includes a logical array of code symbols having rows which include respective row codewords and columns which include respective column codewords. The product codewords are encoded by encoding groups of L symbols, using a rate-L/(L+M) linear block code to produce a plurality of (L+M)-symbol codewords which are logically arranged in nQ encoded blocks (where n is an integer greater than zero). Each of the nQ encoded blocks includes an array having rows and columns of code symbols in which each column includes a codeword of the column code.

BACKGROUND

The present invention relates generally to writing of data on multitracktape, and more specifically to encoding and writing of blocks of data onmultitrack tape in linear tape drives.

In linear tape drives such as LTO (Linear Tape Open) drives andenterprise tape drives, data is written in multiple parallel data tracksextending along the length of the magnetic tape. The write head includesQ write elements for writing data simultaneously in Q data tracks. Incurrent 16-channel LTO drives Q=16 tracks are written simultaneously,and in current 32-channel LTO drives Q=32 tracks are writtensimultaneously.

The smallest unit for appending or overwriting data on magnetic tape isknown as a Data Set (DS). Data Sets in tape storage are currently 3 MBto 6 MB and are expected to increase to 12 MB in the near future. Blocksof user data received from a host interface are encoded and formattedinto Data Sets for recording. After preliminary processing, an inputblock of data is partitioned into sub-blocks. Each of these sub-blocksis protected by a product code. The product code is used to encode rowsand columns of a logical two-dimensional array containing the datasymbols in a sub-block. Each row of data symbols is encoded using a rowlinear block code (C1 code) and each column is encoded using a columnlinear block code (C2 code). The resulting product codeword comprises alogical array of code symbols in which the rows/columns are row/columncodewords including C1-and C2-parity symbols respectively. Subsets ofthese product codewords are then combined by column-interleaving toproduce respective encoded blocks known as Sub Data Sets (SDSs). Thereare currently 32 to 64 Sub Data Sets in a Data Set, though there areplans to increase the number of read/write channels Q to 64 allowing 128SDSs per DS.

The SDSs in a Data Set are subjected to various further processingstages, including formation of packets from rows of the SDSs andinterleaving of packets to determine the packet layout on tape. Thelayout is designed to space different rows of the same SDS, and hencesymbols of the column (C2) codewords, over the region of tape in whichthe DS is written.

It is desired to obtain good error-rate performance on read-back of datafrom tape while minimizing overhead due to redundancy introduced by theerror-correction codes (ECC). Performance of current linear tape drivesis based on an ECC overhead of about 16% due to the C1-and C2-paritysymbols.

SUMMARY

According to at least one embodiment of the present invention there isprovided a method for writing data in Q parallel data tracks onmultitrack tape in a linear tape drive. A block of data is partitionedinto a plurality of sub-blocks each comprising a logical array havingrows and columns of data symbols. The rows and columns of each sub-blockare encoded using a row linear block code and a column linear block coderespectively to produce a product codeword. Each product codewordcomprises a logical array of code symbols having rows which compriserespective row codewords and columns which comprise respective columncodewords. The product codewords are encoded by encoding groups of Lsymbols, each from a respective one of L product codewords, using arate-L/(L +M) linear block code to produce a plurality of (L +M)-symbolcodewords which are logically arranged in nQ encoded blocks (where n isan integer greater than zero). Each of the nQ encoded blocks comprisesan array having rows and columns of code symbols in which each columncomprises a codeword of the column code. The symbols of each of the(L+M)-symbol codewords are distributed over corresponding rows of the nQencoded blocks. Packets are produced from the encoded blocks such thateach packet comprises a row of an encoded block, and the packets for theblock of data are written in the Q parallel data tracks.

The embodiments described above offer improved error-rate performance inlinear tape drives with minor, or even no, increase in ECC overhead.Indeed, total ECC overhead may even be reduced. The rate-L/(L+M) codingacross product codewords offers improved protection against errors in aData Set, inhibiting failures to decode Data Sets which cause permanenterrors resulting in data loss. Addition of the rate-L/(L+M) coding stageis predicated on the realization that coding overhead can be balancedacross the C1, C2 and rate-L/(L+M) codes, thereby to substantiallymaintain or even reduce total ECC overhead compared to current tapedrives while obtaining performance benefits. Moreover, the nQ encodedblocks obtained by encoding the product codewords can be processed asSub-Data Sets in current systems, thus maintaining conformity andavoiding significant processing changes.

Another embodiment of the invention provides a linear tape drive forwriting data in Q parallel data tracks on multitrack tape. The tapedrive includes a data partitioner which is operable to partition a blockof data into a plurality of sub-blocks each comprising a logical arrayhaving rows and columns of data symbols. A product encoder of the driveis operable to encode the rows and columns of each sub-block using a rowlinear block code and a column linear block code respectively to producea product codeword comprising a logical array of code symbols havingrows which comprise respective row codewords and columns which compriserespective column codewords. The drive also includes rate-L/(L+M)encoder apparatus operable to encode the product codewords by encodinggroups of L symbols, each from a respective one of L product codewords,using a rate-L/(L+M) linear block code to produce a plurality of(L+M)-symbol codewords which are logically arranged in nQ encodedblocks, where n is an integer greater than zero. Each of the nQ encodedblocks comprises an array having rows and columns of code symbols inwhich each column comprises a codeword of the column code. The symbolsof each of the (L+M)-symbol codewords are distributed over correspondingrows of the nQ encoded blocks. A packet formatter of the drive isoperable to produce packets from the encoded blocks such that eachpacket comprises a row of an encoded block. The drive has a write-headcomprising Q write elements operable to write the packets for the blockof data in the Q parallel data tracks.

In preferred embodiments, the packets for the block of data areinterleaved and the interleaved packets are output to Q write-channelsfor writing in respective data tracks. Advantageously, the interleavingis performed such that the rows of each encoded block are spaced over aregion of the tape in which the block of data is written, and such thatcorresponding rows of the nQ encoded blocks are spaced over said region.This distributes symbols of the (L+M)-symbol codewords over the tapesurface, protecting these codewords against burst errors, in addition tothe distribution of column (C2) codeword symbols.

In an embodiment, the step of encoding the product codewords comprisescombining (preferably by column-interleaving) the column codewords ineach of L subsets of the product codewords to produce L of the encodedblocks, and encoding groups of L corresponding symbols of respectivecolumn codewords, each from a respective one of the L encoded blocks,using the rate-L/(L+M) code to produce M=(nQ−L) all-parity encodedblocks each containing one parity symbol of each of the (L+M)-symbolcodewords. In this embodiment the rate-L/(L+M) encoding is applied to Lencoded blocks, e.g. L SDSs, giving a coding granularity of one suchblock.

In another embodiment, the block of data is partitioned into Lsub-blocks which are encoded to produce L product codewords. The step ofencoding the product codewords then comprises encoding the L productcodewords using the rate-L/(L+M) code to produce M all-parity productcodewords each containing one parity symbol of each of the (L+M)-symbolcodewords. The column codewords in each of nQ subsets of the L+M productcodewords are combined, preferably by column-interleaving, to produce arespective encoded block. This embodiment applies the rate-L/(L+M)encoding to L product codewords, giving a coding granularity of oneproduct codeword. In particularly efficient implementations, the step ofencoding the L product codewords comprises encoding groups of Lcorresponding symbols of respective said column codewords to produce Mcorresponding symbols of respective column codewords in respective saidall-parity product codewords.

Preferred embodiments may include cyclically rotating symbols ofcodewords of the row (C1) code in each row of each encoded block toproduce a relative cyclical shift between the row codewords in that row.This distributes errors in the (L+M)-symbol codewords, further improvingprotection against burst errors.

Embodiments of the invention will be described in more detail below, byway of illustrative and non-limiting example, with reference to theaccompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic representation of a linear tape drive embodyingthe invention;

FIG. 2 is a schematic block diagram of write processing apparatus in theFIG. 1 drive;

FIGS. 3 and 4 are schematic block diagrams of encoder apparatus and atape layout module respectively in the FIG. 2 apparatus;

FIG. 5 indicates operation of a product encoder in the FIG. 2 apparatus;

FIG. 6 illustrates interleaving of product codewords to produce encodedblocks in an embodiment of the write process;

FIG. 7 illustrates rate-L/(L+M) encoding of encoded blocks;

FIG. 8 shows an embodiment of a rate-L/(L+M) encoder;

FIG. 9 illustrates formation of packets from encoded blocks;

FIG. 10 illustrates packet structures with appended and embeddedheaders;

FIG. 11 indicates allocation of row identifiers to rows of encodedblocks in a packet interleaving operation;

FIGS. 12 and 13 show part of an interleave table indicating layout ofpackets in Q=32 parallel tape tracks in one example of the interleaveprocess;

FIGS. 14a and 14b show part of another interleave table indicatinglayout of packets in Q=64 parallel tape tracks in another example of theinterleave process;

FIG. 15 illustrates rate-L/(L+M) encoding of product codewords inanother embodiment;

FIG. 16 shows another embodiment of a rate-L/(L+M) encoder;

FIG. 17 illustrates packet structures with cyclic rotation of rowcodeword symbols; and

FIGS. 18a and 18b indicate error-rate performance with exemplary codesin an embodiment of the write process.

DETAILED DESCRIPTION

Aspects of the present invention are described herein with reference toblock diagrams of methods, apparatus (systems), and computer programproducts according to embodiments of the invention. It will beunderstood that each block or combinations of blocks in the blockdiagrams may be implemented by computer readable program instructions.These computer readable program instructions may be provided to aprocessor of a general purpose computer, special purpose computer, orother programmable data processing apparatus to produce a machine, suchthat the instructions, which execute via the processor of the computeror other programmable data processing apparatus, create means forimplementing the functions/acts specified in the block diagram block orblocks. These computer readable program instructions may also be storedin a computer readable storage medium that can direct a computer, aprogrammable data processing apparatus, and/or other devices to functionin a particular manner, such that the computer readable storage mediumhaving instructions stored therein comprises an article of manufactureincluding instructions which implement aspects of the function/actspecified in the block diagram block or blocks.

The block diagrams in the figures illustrate the architecture,functionality, and operation of possible implementations of systems,methods, and computer program products according to various embodimentsof the present invention. In this regard, each block in the blockdiagrams may represent a module, segment, or portion of instructions,which comprises one or more executable instructions for implementing thespecified logical function(s). In some alternative implementations, thefunctions noted in the block may occur out of the order noted in thefigures. For example, two blocks shown in succession may, in fact, beexecuted substantially concurrently, or the blocks may sometimes beexecuted in the reverse order, depending upon the functionalityinvolved. It will also be noted that each block and combinations ofblocks in the block diagrams can be implemented by special purposehardware-based systems that perform the specified functions or acts orcarry out combinations of special purpose hardware and computerinstructions.

In some embodiments, electronic circuitry including, for example,programmable logic circuitry, field-programmable gate arrays (FPGA), orprogrammable logic arrays (PLA) may execute the computer readableprogram instructions by utilizing state information of the computerreadable program instructions to personalize the electronic circuitry,in order to perform aspects of the present invention.

FIG. 1 is a high-level block diagram of a linear tape drive 1 in whichmethods embodying the invention may be employed. The drive 1 correspondsgenerally to an LTO drive, whereby the structure and operation of drive1 is generally as defined for LTO drives except where describeddifferently below. The drive 1 includes a host interface 2, writeprocessing apparatus 3, a read/write (R/W) head 4, and read processingapparatus 5. Data to be written to multitrack tape 6 is received from ahost machine by host interface 2 and processed by write apparatus 3. Thewrite processing includes various encoding and formatting stagesdescribed below. The processed data is supplied to read/write head 4which writes data simultaneously to Q parallel data tracks on tape 6. Onreadback, the read data is supplied by read/write head 4 to readcircuitry 5. This performs read processing including decoding anderror-correction operations to recover the host data for return to thehost machine via interface 2.

FIG. 2 is a more detailed schematic of write processing apparatus 3.This includes a pre-processing module 8, a data partitioner 9 and aproduct encoder 10 which comprises a C1 encoder 11 and a C2 encoder 12.The write apparatus also includes rate-L/(L+M) encoder apparatus 13,referred to as “R-encoder apparatus” in the following, for implementinga rate-L/(L+M) code (also referred to as a “(L+M, L) code”). Writeapparatus 3 further includes a tape layout module 14 which provides anoutput to Q parallel write-channels 15. Each write-channel 15 contains achannel processing module 16 from which processed data is supplied to arespective one of Q write elements 17 in read/write head 4. Each writeelement 17 writes data to a respective one of the Q parallel data tracksaddressed in a write operation. These Q tracks are typically a subset ofthe total number of parallel tracks on tape 6 whereby different sets ofQ tracks can be addressed by varying head position across the tape. Head4 also includes Q read elements (not shown), typically in a stackedarrangement with write elements 17, to permit simultaneous reading ofwritten data for verification purposes.

In a write operation, write processing apparatus 3 processes and formatshost data into Data Sets for recording. The host interface 2 suppliesdata to be recorded to pre-processing module 8. Module 8 performsvarious preliminary processing operations, typically including datacompression and addition of cyclic redundancy check codes, andoptionally data encryption. After preliminary processing, module 8outputs a block of data for recording as a Data Set. Data partitioner 9partitions this data block into a plurality of sub-blocks. The resultingsub-blocks, each of which comprises a logical array having rows andcolumns of data symbols, are then output to product encoder 10. Datapartitioner 9 may be implemented as a buffer memory, e.g. in the form ofone or more registers, DRAM, SRAM or other convenient memory structures,for receiving and storing symbols of the input data block and outputtingsymbols of the sub-blocks (serially or in parallel) to product encoder10.

The product encoder 10 encodes each input sub-block into a productcodeword. Specifically, the C1 encoder 11 in product encoder 10 encodesthe rows of each sub-block into respective row codewords using a rowlinear block code (C1 code). Similarly, the C2 encoder 12 encodes thecolumns of each sub-block into respective column codewords using acolumn linear block code (C2 code). This process is described furtherbelow. In preferred embodiments, the C1 and C2 codes are Reed Solomoncodes. Other linear block codes, including for example Low DensityParity Check (LDPC) codes or Bose-Chaudhuri-Hocquenghem (BCH) codes, maybe employed in other embodiments. While in general the C1 and C2encoders can be implemented in hardware or software or a combinationthereof, RS encoders can be efficiently implemented as linear-feedbackshift registers (LFSRs). LSFRs can be constructed in known manner toimplement desired RS codes.

Product encoder 10 outputs the product codewords produced for thecurrent data block to R-encoder apparatus 13. FIG. 3 shows thecomponents of the R-encoder apparatus 13 as a buffer memory 20, a blockformatter 21 and a rate-L/(L+M) encoder (“R-encoder”) 22. Blockformatter 21 comprises logic for controlling storage and readout of codesymbols in buffer memory 20, and for supply of code symbols to R-encoder22. R-encoder 22 encodes groups of L symbols using a rate-L/(L+M) linearblock code (“R-code”) to produce respective (L+M)-symbol codewords asdetailed below. The resulting (L+M)-symbol codewords are stored inmemory 20 and are logically arranged in nQ encoded blocks, or Sub DataSets (SDSs), where n is an integer greater than zero. Buffer memory 20may be implemented by one or more registers, DRAM or SRAM modules orother convenient memory structures. Block formatter 21 and R-encoder 22may in general comprise hardware, software or a combination of hardwareand software components for implementing the functionality described.The R-code is a Reed-Solomon (RS) code in preferred embodiments, and theR-encoder is conveniently implemented as a LFSR. Other linear blockcodes such as LDPC or BCH codes may be used in other embodiments.

The R-encoder apparatus 13 supplies the nQ Sub Data Sets to tape layoutmodule 14. FIG. 4 shows the components of the layout module 14 as abuffer memory 24, a packet formatter 25 and a packet interleaver 26. Theinput SDSs are stored in buffer memory 24. Buffer memory 24 may beimplemented in like manner to buffer memory 20 of the R-encoder. In someembodiments, memories 20, 24 may be implemented by the same memorystructure. Packet formatter 25 comprises logic for producing packetsfrom rows of the SDSs as described below. The packet interleaver 26comprises logic for interleaving the packets as detailed below andoutputting interleaved packets to the Q data channels 15. The logic ofpacket formatter 25 and packet interleaver 26 may be implemented ashardware, software or a combination of hardware and software componentsto perform the functions to be described.

The stream of packets output to each write channel 15 is written along arespective tape track after channel processing in module 16. Thistypically comprises scrambling and modulation encoding stages as well asinsertion of sync patterns for timing recovery on readback.

Operation is described in more detail below for a first embodiment ofthe write process. This embodiment performs SDS-based R-encoding for a32-channel drive. Data partitioner 9 partitions the input data blockinto S sub-blocks, where S=248 in this example. The C1 encoder 11 inproduct encoder 10 implements a (240, 228, 13) RS code, i.e. a rate228/240 code permitting correction of 6 symbol errors per C1 codeword.The C2 encoder 12 implements a (192, 168, 25) RS code, i.e. a rate168/192 code permitting correction of 12 symbol errors per C2 codeword.Operation of product encoder 10 is illustrated schematically in FIG. 5.

One of the S=248 sub-blocks, comprising a logical array with 168 rowsand 228 columns of data symbols, is shown at the top of FIG. 5. C1encoder 11 encodes each row of the sub-block into a C1 codeword byaddition of 12 C1-parity symbols. The resulting array of 168 rowcodewords is shown in the center of the figure. C2 encoder 12 thenencodes each column of the array into a C2 codeword by addition of 24C2-parity symbols. The resulting product codeword is shown at the bottomof the figure. This comprises a logical array in which the 192 rowscomprise respective row (C1) codewords and the 240 columns compriserespective column (C2) codewords. The order of C1 and C2 encoding can bereversed and the resulting product codeword will be identical. In thisprocess, and in general herein, a “row” and “column” of a logical arrayis a matter of selection according to deemed array orientation, wherebyrows and columns are effectively interchangeable herein. Note also thatthe C1 and C2 encoders may each comprise multiple encoder modules forencoding respective rows/columns of the array in parallel.

Product encoder 10 supplies the resulting S=248 product codewords (PCWs)to R-encoder apparatus 13 for storage in memory 20. The block formatter21 combines the column codewords in each of L=62 subsets of the 248 PCWsto produce L=62 encoded blocks (SDSs). Subsets of 4 PCWs are thuscombined to produce an SDS. In this embodiment, the column codewords inthe 4 PCWs are combined by column interleaving the column codewords asillustrated in FIG. 6. This produces an SDS containing 4×240=960 columncodewords. The L=62 SDSs produced in this way are encoded by R-encoder22. R-encoder 22 encodes groups of L symbols, each from a respective oneof L product codewords, using the rate-L/(L+M) linear block code(R-code). In particular, the block formatter 21 supplies groups of Lcorresponding symbols of respective column codewords, each from arespective one of the L SDSs, to R-encoder 22 for encoding intorespective (L+M)-symbol R-codewords by addition of M=(nQ−L) R-paritysymbols in each case. The R-encoding process is illustratedschematically in FIG. 7 where the symbols of three R-codewords arenumbered R1, R2 and R3 respectively. It can be seen that L correspondingsymbols of respective column codewords, each from a product codeword inone of the L SDSs, are R-encoded to produce M parity symbols atcorresponding positions in M=(nQ−L) all-parity SDSs. Each of theall-parity SDSs thus contains one R-parity symbol of each of the(L+M)-symbol R-codewords. In general, M and n are integers greater thanzero. In this example, Q=32, L=62 and n=2, whereby M=64−62=2, and theR-code is a rate-62/64 RS code.

It can be seen that the result of the R-encoding process is to produce aset of 960P R-codewords, each having (L+M)-symbols, where the length ofan SDS row is 960 symbols and P is the length of the C2 column code.P=192 in this example. The (960×192) R-codewords are logically arrangedin nQ (here 64) encoded blocks (SDSs) which make up the Data Set. EachSDS comprises an array having rows and columns of code symbols in whicheach column comprises a codeword of the C2 column code. The (L+M)symbols of each of the R-codewords are distributed over correspondingrows of the nQ SDSs, with one R-symbol per SDS in this embodiment.

FIG. 8 shows a linear feedback shift register for implementing R-encoder22 as a rate-62/64 RS encoder. Calculation in a finite field (also knownas a Galois field (GF)) with 256 elements (where a field element is abyte) GF(256) is defined by the primitive polynomial P(x)=x⁸+x⁴+x³+x²+1.A primitive element α in GF(256) is α=(0 0 0 0 0 0 1 0). The generatorpolynomial is G(x)=(x+α¹²⁷)(x+α¹²⁸)=x²+α¹⁵²x+1. The R-parity symbols aregenerated by processing the requisite symbols through a generatorcircuit whose registers are set to all-zero byte (0 0 0 0 0 0 0 0) priorto processing. Registers r0 and r1 are 8 bits wide. Symbols (bytes) c₀,c₁, c₂, . . . , c₆₁ are fed sequentially into the encoder. After therequisite symbols have been processed, the content of register r1 is c₆₂and that of register r0 is c₆₃. In practice, R-encoder 22 may containmultiple R-encoder modules for generating R-codewords in parallel.

The nQ=64 SDSs obtained following R-encoding are stored in memory 20 ofapparatus 13 and are output to tape layout module 14. It will beappreciated that the FIG. 7 arrays corresponding to SDSs are logicalarrangements only and need not be physically constructed as such. Itsuffices that block formatter 21 can logically combine column codewordsto form the L SDSs for R-encoding, supply appropriate symbols toR-encoder 22, and store the resulting R-parity symbols such that thelogical arrays corresponding to SDS blocks can be identified.

The nQ=64 SDSs of the Data Set are stored in memory 24 of tape layoutmodule 14. Packet formatter 25 produces packets from the SDSs asindicated schematically in FIG. 9. In this embodiment, each packetcontains one row of an SDS plus 12-bytes of header data. Hence P=192packets are produced from each SDS here. Headers may be included in thepackets in various ways, two examples being illustrated in FIG. 10. Theupper diagram in this figure shows simple appending of the header to theSDS row. The 240 symbols of the four interleaved C1 row codewords in theSDS row are labeled 0 to 239. The header may also be embedded in the SDSrow encoding as indicated in the lower diagram of FIG. 10. In this case,packet formatter 25 recalculates the C1 parity as a function of both theC1 payload (symbols 0 to 239 in the upper diagram) and a fragment of the12-byte header. Each one of the four C1 codewords thus embeds 12/4=3header bytes in this example, giving row codewords with symbols labeled0 to 242 in the figure. The RS (240,228) C1 row code before embeddingthus becomes an RS (243,231) C1′ row code after embedding the 3-byteheader fragment. In this way, the C1′-parity also protects the headerbytes, while C2 - and R-codewords do not contain header bytes. TheSDS-based coding of this embodiment also offers improved protectionagainst burst errors. For a C1 code length of 240 in a prior systemusing only C1/C2 coding, 240-byte burst errors anywhere in an SDS rowresult in 240 C2-codewords each having a single-byte error. With theSDS-based coding and a length-240 C1 code, 240-byte burst errorsanywhere in an SDS row result in 240 C2-codewords each having asingle-byte error and 240 R-codewords each having a single-byte error.More generally, m-byte bursts along a tape track are always dispersedinto exactly m R-codewords. Burst errors along tape tracks are thereforedistributed uniformly (i.e. randomized) in C2-and R-codewords.

The packet interleaver 26 of layout module 14 operates to interleave theresulting packets for the nQ=64 SDSs of the Data Set and to output theinterleaved packets to the Q=32 write-channels 15. Each packet,containing a row numbered 0 to (P−1) of an SDS numbered v=0 to (nQ−1),is assigned a row identifier (referred to in LTO drives as a “CWI-4identifier”) y. For P=192 and nQ=2Q=64 here, there are 12288rows/packets. These are assigned identifiers y=0 to ((nQP−1)=12287)according to the table of FIG. 11. The SDS number v can be computed fromthe identifier y by v=mod(y, nQ), i.e. v=mod(y, 2Q) here, where thefunction mod(a,b) represents the remainder of dividing a by b. Hence therows of SDS number v=0, bounded by the bold line in the table, areassigned identifiers y=0, 64, 128, . . . , etc. Row number 0 of all SDSsv=0 to 63, shown shaded in the table, are assigned identifiers y=0, 1,2, . . . , etc.

The nQP=12288 packets will be written to the Q=32 tracks in 2P=384packet sets (referred to in LTO drives as a “CWI-4 sets”) eachcontaining Q=32 packets. The Q=32 packets in each CWI-4 set are writtensimultaneously to respective tracks by write elements 17. The CWI-4 setsare assigned set numbers c=0 to ((2P−1)=383), and the Q tracks areassigned logical track numbers t=0 to ((Q−1)=31). Packet interleaver 26interleaves the 12288 packets by assigning the identifiers y to CWI-4sets c and logical tracks t according to:y=mod(2Q floor(c/2)+(P+1)(mod(mod(c,2)+floor(c/P),2)+2mod(t+Ufloor(c/2),Q)), 2QP)where the function floor(x) is the largest integer not greater than x,and U is a parameter used to rotate tracks. In general, nQP packets willbe written to the Q tracks in nP packet sets (CWI-4 sets). In this casepacket interleaver 26 interleaves the nQP packets by assigning theidentifiers y to CWI-4 sets c and logical tracks t according to:y=mod(nQ floor(c/n)+(P+1) (mod(mod(c,n)+floor(c/P),n)+n mod(t+Ufloor(c/n),Q)), nQP).

Thus, for given parameters n, Q, P and U, and on input t and c, thepacket interleaver outputs the packet with identifier y given by theabove formula to the write channel 15 corresponding to logical track t,whereby the packets on each channel are output in order of CWI-setnumber c.

FIG. 12 shows a portion of the resulting interleave table indicating theassignment of packets with CWI identifiers y to CWI sets c=0 to 383 andlogical tracks t=0 to 31 for parameters n=2, P=192, Q=32, and U=19 inthis example. CWI identifiers corresponding to rows/packets from SDSnumber 0 are bordered in bold in the table, and identifierscorresponding to row number 0 in different SDSs are shown shaded. Rowsfrom the same SDS with other SDS numbers, and other row numbers in eachSDS in the Data Set, are spaced in corresponding fashion throughout thetable. As illustration, FIG. 13 shows the interleave table with rows inSDS number 13 bordered in bold, and row number 2 in different SDSs shownshaded. It can be seen that, when the interleaved packets are written tothe Q=32 tracks, the rows of each SDS will be spaced over the region ofthe tape in which the Data Set encoding the original input data block iswritten. Corresponding rows of the nQ SDSs are also spaced over thisregion of the tape. In general, the interleave operation can be adaptedsuch that the rows in each case are well-spaced over the tape. The rowsmay be spaced in a substantially regular pattern, and may be distributedto provide an approximately even, substantially uniform or otherwisegenerally wide spacing of the rows over the tape. The example shown inFIGS. 12 and 13 gives a substantially uniform spacing.

By spacing corresponding rows of all SDSs via the interleave process,symbols of the R-codewords are distributed over the tape surface,protecting these codewords against burst errors. This is in addition tothe distribution of column (C2) codeword symbols resulting from thespacing of rows of each SDS.

The write process can be readily extended to other values of Q. FIGS.14a and 14b show a portion of the layout table obtained via the aboveprocess for Q=64 parallel data tracks in a 64-channel drive withparameters n=2, P=192 and U=35. The rows of SDS number 0 are bordered inbold, and row number 0 in different SDSs is shown shaded, to illustraterow spacing in this example.

The SDS-based coding of FIG. 7 gives a coding granularity of one SDS forthe R-encoding. In an alternative embodiment, R-encoder apparatus 13performs PCW-based encoding. In this embodiment, data partitioner 9partitions the input data block into L sub-blocks. These are encoded byproduct encoder 10 to produce L product codewords which are supplied toR-encoder apparatus 13. R-encoder 22 then encodes the L PCWs using therate-L/(L+M) code to produce M all-parity PCWs each containing oneparity symbol of each of the (L+M)-symbol codewords. This process isillustrated in FIG. 15. Specifically, groups of L corresponding symbolsof respective column codewords, one from each PCW, are supplied by blockformatter 21 to R-encoder 22. The R-encoder encodes each group of Lcorresponding symbols to produce M corresponding symbols of respectivecolumn codewords, one in each of the M all-parity PCWs. The columncodewords in the resulting set of L+M PCWs can then be combined toproduce SDSs, preferably by column interleaving as before. Inparticular, block formatter 21 interleaves the column codewords in eachof nQ subsets of the L+M PCWs to produce a respective SDS. The result ofthis process is again a set of nQ SDSs in which each column comprises acodeword of the C2 column code, and the symbols of each of the(L+M)-symbol R-codewords are distributed over corresponding rows of thenQ encoded blocks.

FIG. 16 illustrates an RS encoder for implementing R-encoder 22 in anexample of the PCW-based encoding of FIG. 15. This encoder implements anRS (128, 126) code. Calculation in a finite field GF(256) is defined bythe primitive polynomial P(x)=x⁸+x⁴+x³+x²+1. A primitive element α inGF(256) is α=(0 0 0 0 0 0 1 0). The generator polynomial isG(x)=(x+α¹²⁷) (x+α¹²⁸)=x²+α¹⁵²x+1. The parity symbols are generated byprocessing the requisite symbols through a generator circuit whoseregisters are set to all-zero byte (0 0 0 0 0 0 0 0) prior toprocessing. Registers r0 and r1 are 8 bits wide. Data symbols (bytes)c₀, c₁, c₂, . . . , c₁₂₅ are fed sequentially into the encoder. Afterthe requisite symbols have been processed, the content of r1 is c₁₂₆ andthat of r0 is c₁₂₇.

The PCW-based coding of FIG. 15 gives a coding granularity of one PCWfor the R-encoding. The SDSs obtained following PCW-based R-encoding canbe processed in similar fashion to those of the first embodiment. Inparticular, packets produced from rows of the SDSs preferably containembedded headers. Advantageously in this embodiment, packet formatter 25also cyclically rotates symbols of row codewords in each row to producea relative cyclical shift between the row codewords in that row (andhence in each packet here). This cyclic rotation is illustratedschematically in FIG. 17 for the exemplary packets of FIG. 10. The upperdiagram in FIG. 17 shows the result of cyclic rotation for the packetwith appended header, and the lower diagram shows the result for thepacket with embedded header. In the upper diagram, a relative cyclicalshift of 60 symbols is introduced between the row codewords. In thelower diagram, a relative cyclical shift of 61 symbols is introducedbetween the row codewords with embedded header fragments. This providesimproved protection against burst errors in this embodiment. For alength-240 C1 code, 240-byte burst errors anywhere in an SDS row resultin 240 C2 codewords each having a single-byte error and 240 R codewordseach having a single-byte error. Therefore, burst errors along tapetracks are again distributed uniformly (randomized) in C2 and Rcodewords.

The R-encoding in the above embodiments provides improvederror-protection for Data Sets, inhibiting decoding failures resultingin loss of data. On-the-fly decoding is improved because additionalerror patterns can be corrected as a result of the R-encoding. Offlinedecoding can be improved by using alternative decoding strategies, e.g.decoding across different planes, during the Error Recovery Procedure(ERP). Use of the R-code also offers the capability of detectingdecoding errors, i.e. mis-corrections, in a Data Set.

The R-encoding is accommodated in the above process while maintainingwrite processing stages generally in conformity with current LTOsystems, thus avoiding significant processing changes. Moreover,improved error-rate performance can be achieved with minor (about 1% orless) increase in overhead, or even with no increase in overheadcompared to current systems. Coding overhead can be balanced across theC1-, C2-and R-codes, permitting performance benefits to be achievedwhile maintaining or even reducing total ECC overhead compared tocurrent tape drives. As illustration, FIGS. 18a and 18b illustrateperformance of exemplary codes in terms of byte error rate afterdecoding versus raw bit error rate and raw byte error rate respectively.These graphs show results for an RS(246,234) C1 code alone and a priorC1/C2 system using the RS(246,234) C1 code combined with an RS(96,84) C2code. These are compared with a C1/C2/R system embodying the inventionusing a slightly weaker RS(96,86) C2 code and an RS(256,250) R code. Theweaker C2 code allows insertion of the R overhead without increasing thetotal ECC overhead compared to the C1/C2 system. It can be seen that theC1/C2/R code offers improved error performance in each case, providing atwo-fold increase in robustness to both raw channel bit errors and rawchannel byte errors, with no increase in ECC overhead.

It will be appreciated that many changes and modifications can be madeto the above embodiments. For example, other values of parameters suchas U, S, L, M, n, P and Q can be readily accommodated, and numerousother examples of C1, C2 and R codes can be envisaged. The RS codes inthe above examples are based on 8-bit symbols (bytes). However, RS codesbased on other symbol sizes may be employed in other embodiments.Increasing the symbol size allows a corresponding increase in the RScodeword length in symbols. For example, it is envisaged that 10-bit RSsymbols may be employed in future tape drives, offering the possibilityof using much longer RS codes than those used in the above embodiments.

As another example, the cyclic rotation of row codeword symbols could beperformed at various stages depending on whether or not packets haveembedded headers. For example, when using appended headers in thePCW-based R-encoding, the cyclic rotation could be effected wheninterleaving column codewords of PCWs to produce SDSs.

The descriptions of the various embodiments of the present inventionhave been presented for purposes of illustration, but are not intendedto be exhaustive or limited to the embodiments disclosed. Manymodifications and variations will be apparent to those of ordinary skillin the art without departing from the scope and spirit of the describedembodiments. The terminology used herein was chosen to best explain theprinciples of the embodiments, the practical application or technicalimprovement over technologies found in the marketplace, or to enableothers of ordinary skill in the art to understand the embodimentsdisclosed herein.

What is claimed is:
 1. A linear tape drive for writing data in Qparallel data tracks on multitrack tape, the tape drive comprising: adata partitioner operable to partition a block of data into a pluralityof sub-blocks each comprising a logical array having rows and columns ofdata symbols; a product encoder operable to encode the rows and columnsof each sub-block using a row linear block code and a column linearblock code respectively to produce a product codeword comprising alogical array of code symbols having rows which comprise respective rowcodewords and columns which comprise respective column codewords;rate-L/(L+M) encoder apparatus operable to encode the product codewordsby encoding groups of L symbols, each from a respective one of L productcodewords, using a rate-L/(L+M) linear block code to produce a pluralityof (L+M)-symbol codewords which are logically arranged in nQ encodedblocks each comprising an array having rows and columns of code symbolsin which each column comprises a codeword of said column code, whereinthe symbols of each of said (L+M)-symbol codewords are distributed overcorresponding rows of the nQ encoded blocks and n is an integer greaterthan zero; a packet formatter operable to produce packets from theencoded blocks, each packet comprising a row of an encoded block; and awrite-head comprising Q write elements operable to write the packets forsaid block of data in said Q parallel data tracks.
 2. A tape drive asclaimed in claim 1 including a packet interleaver operable to interleavethe packets for said block of data and to output the interleaved packetsto Q write-channels for supply to respective said write elements, thepacket interleaver being adapted to interleave the packets such that therows of each encoded block are spaced over a region of the tape in whichsaid data block is written, and such that corresponding rows of the nQencoded blocks are spaced over said region.
 3. A tape drive as claimedin claim 2 wherein the rate-L/(L+M) encoder apparatus comprises: a blockformatter operable to combine the column codewords in each of L subsetsof the product codewords to produce L said encoded blocks; and arate-L/(L+M) encoder operable to encode groups of L correspondingsymbols of respective column codewords, each from a respective one ofsaid L encoded blocks, using said rate-L/(L+M) code to produce M=(nQ−L)all-parity encoded blocks each containing one parity symbol of each ofsaid (L+M)-symbol codewords.
 4. A tape drive as claimed in claim 3wherein the data partitioner is operable to partition said block of datainto L said sub-blocks whereby the product encoder produces L saidproduct codewords, and wherein the rate-L/(L+M) encoder apparatuscomprises: a rate-L/(L+M) encoder operable to encode the L productcodewords using said rate-L/(L+M) code to produce M all-parity productcodewords each containing one parity symbol of each of said (L+M)-symbolcodewords; and a block formatter operable to combine the columncodewords in each of nQ subsets of the L+M product codewords to producea respective said encoded block.
 5. A tape drive as claimed in claim 4wherein the rate-L/(L+M) encoder is operable to encode groups of Lcorresponding symbols of respective said column codewords to produce Mcorresponding symbols of respective column codewords in respective saidall-parity product codewords.
 6. A tape drive as claimed in claim 5wherein the packet formatter is operable to cyclically rotate symbols ofcodewords of said row code in each row of each encoded block to producea relative cyclical shift between the row codewords in that row.
 7. Atape drive as claimed in claim 1 wherein said row linear block code,said column linear block code and said rate-L/(L+M) linear block codeare Reed-Solomon codes.